<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('审核用户')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-member-edit" th:object="${member}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">身份证号码：</label>
            <div class="col-sm-8">
                <input name="idCard" th:field="*{idCard}" class="form-control" type="text" readonly="readonly">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">身份证正面：</label>
            <div class="col-sm-8">
                <div class="layui-upload-list">
                    <div id="cardHeaderImg" style="padding: 5px;"><img th:src="*{cardHeaderImg}" style='height: 400px;width: 400px'></div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">身份证背面：</label>
            <div class="col-sm-8">
                <div class="layui-upload-list">
                    <div id="cardBackImg" style="padding: 5px;"><img th:src="*{cardBackImg}" style='height: 400px;width: 400px'></div>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">审核：</label>
            <div class="col-sm-8">
                <select id="isExamine" name="isExamine" class="form-control m-b">
                    <option  value="2">通过</option >
                    <option  value="3">不通过</option >
                </select>
            </div>
        </div>
        <div id="scanner_reason" style="display: none">
            <div class="form-group">
                <label class="col-sm-3 control-label">原因：</label>
                <div class="col-sm-8">
                    <textarea name="reason" class="form-control"></textarea>
                </div>
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    var prefix = ctx + "system/member";
    $("#form-member-edit").validate({
        focusCleanup: true
    });


    $("#isExamine").on("change",function(){
        if ($(this).val()==3){
            $("#scanner_reason").show();
        }else{
            $("#scanner_reason").hide();
        }
    });


    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/examine/edit", $('#form-member-edit').serialize());
        }
    }
</script>
</body>
</html>